from itertools import count
from symtable import Class
from tkinter.font import names

from bq import sum
print("hello world")

a='hello'
b=100
c= False
d=11.1
e=11.11
f=[1,2,3]
g={
    a:1
}

print(type(a),type(b),type(c),type(d),type(e),type(f),type(g))

'''
if b>0:
    print("0")
elif 0<b<200:
    print(200)
else:
    print(555)

for i in f:
    print(i)

for i in g:
    print(i)
'''
l2=[1,2,3,4,5,6]
l3=[7,8,9]

l3.insert(2,22)
print(l3)

# print(l2[2::])
# print(l2[2::4])
# print(l2[2::-1])
'''
l2.append(4)  #增加
print(l2)
print(l2.count(4)) # 统计元素出现次数
l2.extend(l3) # 扩展添加
print(l2)
l2.remove(2)  #删除元素
print(l2)
l2.remove(l2[2]) #更具索引删除
print(l2)

print(l2.reverse())
print(l2.sort())
'''
print(len(l2))
print(max(l2))
print(min(l2))
while b>10:
    if b%10==0:
        print(b)
    b-=1

print(b)

yz=(1,2)

def fun(aa,bb=10):
    global b  #应用外部的变量
    b+=200
    return aa+bb
def fun2(**l): #指定参数传参
    print(l)

def fun3(*o): #不定长传参
    print(o)
print(fun(20,20))
print(b)
fun3(20,30,'d')

fun2(t=10,f=20)

fun4=lambda x,y:x+y

print(fun4(10,20))
b="ddd"
print(b)

zd={
    "a":5,
    "b":"5555",
    "c":{
        "c1":True
    }
}
print(zd['a'])
#del zd['a']
print(zd)
print(len(zd))
print(zd.keys())
print(zd.values())
print(zd.items())

print(sum(20,60,80))

class Person(object):
    def __init__(self,name,age):
        self.name=name
        self.age=age
    def p(self):
        print(self.name+str(self.age) )

p=Person("John",20)
p.p()

class Student(Person):    #(继承的父级)
    #def __init__(self,name,age):
    def study(self):
        print("styu")

stu=Student("Jofhn",20)
stu.study()
stu.p()